package com.example.librarysystem.Dao;

import com.example.librarysystem.entity.Credit;
import org.springframework.stereotype.Component;

import java.sql.Date;
import java.util.List;

@Component("creditDao")
public interface CreditDao {
    Integer selectCount();
    Integer selectIsBreach(int borrowerId);
    List<Credit> selectByBorrowerId(int borrowerId,int currentPage, int pageSize);
    int selectByBorrowerIdCount(int borrowerId);
    List<Credit> selectByBorrowerIdWithoutPage(int borrowerId);
    List<Credit> selectByEndDate(Date breachEnd);
    Credit selectByBorrowerIdWithBreach(int borrowerId);
    void updateCredit(Credit credit);
    void insertCredit(Credit credit);
}
